﻿#include "topo_face.h"

CAGD::TopoFace::TopoFace() : m_shell(nullptr), m_loop(nullptr)
{
}

CAGD::TopoFace::TopoFace(Handle(GeomSurface) surface) : TopoFace()
{
    m_surface = surface;

    // 暂时不建立拓扑
}

CAGD::TopoFace::~TopoFace()
{
    // 移除 loop
    if (m_loop != nullptr)
        delete m_loop;
}

Handle(CAGD::GeomSurface) CAGD::TopoFace::Geom() const
{
    return m_surface;
}

CAGD::TopoShell *&CAGD::TopoFace::Shell()
{
    return m_shell;
}

CAGD::TopoLoop *&CAGD::TopoFace::Loop()
{
    return m_loop;
}

CAGD::TopoType CAGD::TopoFace::Type() const
{
    return TopoType::FACE;
}
